<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>吉林建筑大学教师考勤系统 - 考勤记录</title>
    <link rel="stylesheet" href="styles/main.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    <style>
        .filter-item {
            background-color: white;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .filter-item i {
            color: #4CAF50;
        }
        
        .filter-item input,
        .filter-item select {
            border: none;
            outline: none;
            padding: 0.3rem;
        }
        
        .status-icon {
            padding: 0.3rem 0.6rem;
            border-radius: 4px;
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
        }
        
        .status-normal {
            background-color: rgba(76, 175, 80, 0.1);
        }
        
        .status-late {
            background-color: rgba(255, 152, 0, 0.1);
        }
        
        .status-absent {
            background-color: rgba(244, 67, 54, 0.1);
        }
        
        .modal-content {
            padding: 2rem;
            background: white;
            border-radius: 8px;
            width: 400px;
        }

        .form-control {
            width: 100%;
            padding: 0.5rem;
            margin: 0.5rem 0;
            border: 1px solid #ddd;
            border-radius: 4px;
        }

        .form-buttons {
            display: flex;
            justify-content: flex-end;
            gap: 1rem;
            margin-top: 1rem;
        }

        .btn-submit {
            background-color: #4CAF50;
        }

        .btn-cancel {
            background-color: #f44336;
        }

        .status-badge {
            padding: 0.3rem 0.6rem;
            border-radius: 4px;
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
        }

        .status-badge.normal {
            background-color: rgba(76, 175, 80, 0.1);
            color: #4CAF50;
        }

        .status-badge.late {
            background-color: rgba(255, 152, 0, 0.1);
            color: #FF9800;
        }

        .status-badge.absent {
            background-color: rgba(244, 67, 54, 0.1);
            color: #f44336;
        }

        .status-badge.early-leave {
            background-color: rgba(156, 39, 176, 0.1);
            color: #9C27B0;
        }

        .btn-delete {
            background-color: #f44336;
            color: white;
            border: none;
            padding: 0.5rem;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        .btn-delete:hover {
            background-color: #d32f2f;
        }
    </style>
</head>
<body>
    <nav>
        <img src="images/logo.png" alt="Logo" class="logo">
        <ul>
            <li><a href="index.html">首页</a></li>
            <li><a href="employees.html">教师管理</a></li>
            <li><a href="attendance.html" class="active">考勤记录</a></li>
        </ul>
    </nav>
    <main>
        <h1>教师考勤记录</h1>
        <div class="controls">
            <div class="filter-item">
                <i class="fas fa-calendar"></i>
                <input type="date" id="dateFilter">
            </div>
            <div class="filter-item">
                <i class="fas fa-building"></i>
                <select id="departmentFilter">
                    <option value="">所有学院</option>
                </select>
            </div>
            <button onclick="showAddAttendanceForm()" class="btn-add">
                <i class="fas fa-plus"></i> 添加考勤记录
            </button>
            <button onclick="deleteTodayAttendance()" class="btn-delete">
                <i class="fas fa-trash"></i> 删除今日记录
            </button>
        </div>
        <table id="attendanceTable">
            <thead>
                <tr>
                    <th>日期</th>
                    <th>姓名</th>
                    <th>学院</th>
                    <th>上班时间</th>
                    <th>下班时间</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody id="attendanceList"></tbody>
        </table>
    </main>
    <script src="js/attendance.js"></script>
</body>
</html> 